package catherineliu.main.factory.shape;

/**
 * 项目：DesignPatternsDemo
 * 文件描述：
 * 作者：ljj
 * 创建时间：2020/11/25
 */
public class TestShapeFactory {

    public static void main(String[] args) {

        ShapeInterface rectangle = new ShapeFactory().getShapeArea("rectangle", 1, 2);
        ShapeInterface square = new ShapeFactory().getShapeArea("square", 1, 0);
        ShapeInterface circle = new ShapeFactory().getShapeArea("circle", 3, 0);
        rectangle.draw();
        square.draw();
        circle.draw();
    }

}
